<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/5/7
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>购物车</title>
</head>

<script src="js/jquery-3.6.0.min.js"></script>
<script>
    $(function () {
        $("#back").click(function () {
            history.back();
        })
    });
</script>
<body>
<table border="1" width="700px" cellpadding="10" cellspacing="0" align="center">
    <caption><h2>我的购物车</h2></caption>
    <tr>
        <th>商品编号</th>
        <th>商品名称</th>
        <th>商品价格</th>
        <th>商品描述</th>
        <th>上架时间</th>
    </tr>
    <c:forEach items="${pd}" var="pd">
    <tr>
        <td>${pd.pid}</td>
        <td>${pd.pname}</td>
        <td>${pd.price}</td>
        <td>${pd.pdesc}</td>
        <td>${pd.pdate}</td>
    </tr>
    </c:forEach>
    <tr>
        <td colspan="5"><button id="back">返回</button></td>
    </tr>
</table>
</body>
</html>
